{{include file="default/Public/header.html"}}
<form method="post" action='{{U url="frbac/manage?dosubmit=1&appname=$appname"}}' >
<div id="pageTop">
	<div class="addBtn">
		<a href='{{U url="frbac/add?appname=$appname" }}' class="btn1">注册操作</a>
		<a href='{{U url="frbac/Autoadd?doupdate=1&appname=$appname" }}' class="btn1">更新模块</a>
	</div>
	<div class="search">
	    <select name="field">	    	
	    	<option value="name" {{if $search.field == 'name'}}selected="selected"{{/if}}>操作名称</option>
	    	<option value="controller" {{if $search.field == 'controller'}}selected="selected"{{/if}}>模块文件</option>
	    	<option value="action" {{if $search.field == 'action'}}selected="selected"{{/if}}>操作动作</option>
	    </select>
		<input type="text" name="q" onblur="if (value ==''){value='请输入关键字'}" onfocus="if (value =='请输入关键字'){value =''}" value="{{if $search.q!=''}}{{$search.q}}{{else}}请输入关键字{{/if}}"/>
		<button type="submit"></button>
	</div>
</div>
</form>

<div id="pageCo">
	<div class="listForm">
		<table cellpadding="0" cellspacing="0">
			<thead>
				<tr>
					<th title="全选/反选" width="30"><input type="checkbox" name="checkAll" /></th>
			        <th width="30">ID</th>
			        <th>操作名称</th>
			        <th width="100">所属应用</th>
			        <th width="70">模块文件</th>
			        <th width="70">操作动作</th>
			        <th width="35">编辑</th>
			        <th width="35">删除</th>
				</tr>
			</thead>
			<tbody> 
				{{foreach from=$data.info item=v key=k}}
			    <tr>
			      <td><input name="aid[]" type="checkbox" rel="checkbox" id="aid_{{$k}}" value="{{$v.aid}}"></td>
			      <td>{{$v.aid}}</td>
			      <td>{{$v.name}}</td>
			      <td>{{if $v.appname == 'admin'}}
			        后台
			        {{elseif $v.appname == 'front'}}
			        会员
			        {{/if}}</td>
			      <td>{{$v.controller}}</td>
			      <td>{{$v.action}}</td>
			      <td><a href='{{U url="frbac/edit?aid=`$v.aid`"}}'>编辑</a></td>
			      <td><a href='{{U url="frbac/delete?aid=`$v.aid`"}}' onclick="return window.confirm('此操作无法撤销，你确定要删除改模块操作记录？');">删除</a></td>
			    </tr>
			   {{foreachelse}}
			   <tr><td colspan="8">暂无记录！</td></tr>
			  {{/foreach}}
			</tbody>
		</table>	
	</div>	
	<div class="pageList">
		{{$data.pages}}
		<ul class="clearit"></ul> 
	</div>
</div>
{{include file="default/Public/footer.html"}}